package org.apache.zookeeper.server.paxos2;
import java.util.*;

public class PerformanceTest{

    public static void main(String[] args) throws Exception{
	byte[] data = new byte[Configuration.blockSize];
	ArrayList<Integer> stripes = new ArrayList<Integer>();
	stripes.add(1);
	stripes.add(2);
	stripes.add(3);

	Storage s = new Storage(new ArrayList<Integer>(stripes), null);
	System.out.println("haha");
	long start = System.currentTimeMillis();
	Random r = new Random();

	for(long i=0; i<Configuration.totalSize/Configuration.blockSize; i++){
	    long blockId = i; //r.nextInt()/Configuration.blockSize;
	    //long blockId = (Math.abs(r.nextLong()))%(Configuration.totalSize/Configuration.blockSize);
	    //s.write(blockId, data, 0);
	}
	System.out.println("thoughput = "+ Configuration.totalSize*1000/(System.currentTimeMillis() - start));
	Thread.sleep(1000);
	s.close();
    }
}
